package com.aiyige.page.my.customer.model;

import android.text.TextUtils;

/**
 * Created by xiachao on 2018/4/11.
 */

public class CustomerFollowupEntity {
    private String followuperId;//	跟进用户id	是	[string]	22222	查看
    private String customerId;//		客户id	是	[string]	111111	查看
    private String interestProduct;//		意向产品	是	[string]	肚皮舞	查看
    private String followupContent;//		跟进内容	是	[string]	dsafhshfho;ahgasfashfhoafhahfiuafha	查看
    private long followupTime;//		跟进时间	是	[string]	1521776639	查看
    private long nextFollowupTime;//		下次跟进时间	是	[string]	1521776639	查看
    private String nextFollowupContent;//		下次跟进内容	是	[string]	safhihifhailhfsa	查看
    private long createTime;//		创建时间	是	[string]	1521776639	查看
    private long update_time;//		更新时间	是	[string]
    private String id;//
    private long nearestFollowupTime;
    private long nearestNextFollowupTime;

    private CustomerFollowupEntity(Builder builder) {
        setFollowuperId(builder.followuperId);
        setCustomerId(builder.customerId);
        setInterestProduct(builder.interestProduct);
        setFollowupContent(builder.followupContent);
        setFollowupTime(builder.followupTime);
        setNextFollowupTime(builder.nextFollowupTime);
        setNextFollowupContent(builder.nextFollowupContent);
        setCreateTime(builder.createTime);
        setUpdate_time(builder.update_time);
        setId(builder.id);
        setNearestFollowupTime(builder.nearestFollowupTime);
        setNearestNextFollowupTime(builder.nearestNextFollowupTime);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public long getNearestFollowupTime() {
        return nearestFollowupTime;
    }



    public CustomerFollowupEntity() {

    }

    /**
     * 把subject转化为中文并用"/"拼接
     * @return
     */
    public String getInterestProductValues() {
        String productValues = "";
        if (!TextUtils.isEmpty(interestProduct)) {
            if (interestProduct.contains("/")) {
                String list[] = interestProduct.split("/");
                if (list.length > 0) {
                    for (String subject : list) {
                        if (TextUtils.isEmpty(productValues)) {
                            productValues = subject;
                        } else {
                            productValues+= "/"+subject;
                        }
                    }
                }
            } else {
                productValues = interestProduct;
            }
        }
        return productValues;
    }


    public String getFollowuperId() {
        return followuperId == null ? "" : followuperId;
    }

    public void setFollowuperId(String followuperId) {
        this.followuperId = followuperId;
    }

    public String getCustomerId() {
        return customerId == null ? "" : customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getInterestProduct() {
        return interestProduct == null ? "" : interestProduct;
    }

    public void setInterestProduct(String interestProduct) {
        this.interestProduct = interestProduct;
    }

    public String getFollowupContent() {
        return followupContent == null ? "" : followupContent;
    }

    public void setFollowupContent(String followupContent) {
        this.followupContent = followupContent;
    }

    public long getFollowupTime() {
        return followupTime;
    }

    public void setFollowupTime(long followupTime) {
        this.followupTime = followupTime;
    }

    public long getNextFollowupTime() {
        return nextFollowupTime;
    }

    public void setNextFollowupTime(long nextFollowupTime) {
        this.nextFollowupTime = nextFollowupTime;
    }

    public String getNextFollowupContent() {
        return nextFollowupContent == null ? "" : nextFollowupContent;
    }

    public void setNextFollowupContent(String nextFollowupContent) {
        this.nextFollowupContent = nextFollowupContent;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public long getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(long update_time) {
        this.update_time = update_time;
    }

    public String getId() {
        return id == null ? "" : id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setNearestFollowupTime(long nearestFollowupTime) {
        this.nearestFollowupTime = nearestFollowupTime;
    }

    public long getNearestNextFollowupTime() {
        return nearestNextFollowupTime;
    }

    public void setNearestNextFollowupTime(long nearestNextFollowupTime) {
        this.nearestNextFollowupTime = nearestNextFollowupTime;
    }

    public static final class Builder {
        private String followuperId;
        private String customerId;
        private String interestProduct;
        private String followupContent;
        private long followupTime;
        private long nextFollowupTime;
        private String nextFollowupContent;
        private long createTime;
        private long update_time;
        private String id;
        private long nearestFollowupTime;
        private long nearestNextFollowupTime;

        private Builder() {
        }

        public Builder followuperId(String followuperId) {
            this.followuperId = followuperId;
            return this;
        }

        public Builder customerId(String customerId) {
            this.customerId = customerId;
            return this;
        }

        public Builder interestProduct(String interestProduct) {
            this.interestProduct = interestProduct;
            return this;
        }

        public Builder followupContent(String followupContent) {
            this.followupContent = followupContent;
            return this;
        }

        public Builder followupTime(long followupTime) {
            this.followupTime = followupTime;
            return this;
        }

        public Builder nextFollowupTime(long nextFollowupTime) {
            this.nextFollowupTime = nextFollowupTime;
            return this;
        }

        public Builder nextFollowupContent(String nextFollowupContent) {
            this.nextFollowupContent = nextFollowupContent;
            return this;
        }

        public Builder createTime(long createTime) {
            this.createTime = createTime;
            return this;
        }

        public Builder update_time(long update_time) {
            this.update_time = update_time;
            return this;
        }

        public Builder id(String id) {
            this.id = id;
            return this;
        }

        public Builder nearestFollowupTime(long nearestFollowupTime) {
            this.nearestFollowupTime = nearestFollowupTime;
            return this;
        }

        public Builder nearestNextFollowupTime(long nearestNextFollowupTime) {
            this.nearestNextFollowupTime = nearestNextFollowupTime;
            return this;
        }

        public CustomerFollowupEntity build() {
            return new CustomerFollowupEntity(this);
        }
    }
}